home *** CD-ROM | disk | FTP | other *** search
/ Programming Microsoft Visual Basic .NET / Programming Microsoft Visual Basic .NET (Microsoft Press)(X08-78517)(2002).bin / setup / vbnet / 16 windows forms / customizedformsdemo / dynamicpropertiesform.vb < prev    next >
Encoding:
Text File  |  2002-03-16  |  4.9 KB  |  127 lines

  1. Public Class DynamicPropertiesForm
  2.     Inherits System.Windows.Forms.Form
  3.  
  4.     ' nothing to do in this form - dynamic properties are automatically
  5.     ' loaded in the code portion below
  6.  
  7. #Region " Windows Form Designer generated code "
  8.  
  9.     Public Sub New()
  10.         MyBase.New()
  11.  
  12.         'This call is required by the Windows Form Designer.
  13.         InitializeComponent()
  14.  
  15.         'Add any initialization after the InitializeComponent() call
  16.  
  17.     End Sub
  18.  
  19.     'Form overrides dispose to clean up the component list.
  20.     Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
  21.         If disposing Then
  22.             If Not (components Is Nothing) Then
  23.                 components.Dispose()
  24.             End If
  25.         End If
  26.         MyBase.Dispose(disposing)
  27.     End Sub
  28.     Friend WithEvents txtServerName As System.Windows.Forms.TextBox
  29.     Friend WithEvents Label1 As System.Windows.Forms.Label
  30.     Friend WithEvents Label2 As System.Windows.Forms.Label
  31.     Friend WithEvents txtUserName As System.Windows.Forms.TextBox
  32.     Friend WithEvents Label3 As System.Windows.Forms.Label
  33.     Friend WithEvents txtPassword As System.Windows.Forms.TextBox
  34.     Friend WithEvents Button1 As System.Windows.Forms.Button
  35.     
  36.     'Required by the Windows Form Designer
  37.     Private components As System.ComponentModel.Container
  38.  
  39.     'NOTE: The following procedure is required by the Windows Form Designer
  40.     'It can be modified using the Windows Form Designer.  
  41.     'Do not modify it using the code editor.
  42.     <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
  43.         Dim configurationAppSettings As System.Collections.Specialized.NameValueCollection = System.Configuration.ConfigurationSettings.AppSettings
  44.         Me.Label1 = New System.Windows.Forms.Label()
  45.         Me.Label2 = New System.Windows.Forms.Label()
  46.         Me.txtServerName = New System.Windows.Forms.TextBox()
  47.         Me.Button1 = New System.Windows.Forms.Button()
  48.         Me.txtUserName = New System.Windows.Forms.TextBox()
  49.         Me.Label3 = New System.Windows.Forms.Label()
  50.         Me.txtPassword = New System.Windows.Forms.TextBox()
  51.         Me.SuspendLayout()
  52.         '
  53.         'Label1
  54.         '
  55.         Me.Label1.Location = New System.Drawing.Point(24, 24)
  56.         Me.Label1.Name = "Label1"
  57.         Me.Label1.Size = New System.Drawing.Size(216, 24)
  58.         Me.Label1.TabIndex = 1
  59.         Me.Label1.Text = "Server Name"
  60.         '
  61.         'Label2
  62.         '
  63.         Me.Label2.Location = New System.Drawing.Point(24, 96)
  64.         Me.Label2.Name = "Label2"
  65.         Me.Label2.Size = New System.Drawing.Size(216, 24)
  66.         Me.Label2.TabIndex = 1
  67.         Me.Label2.Text = "User Name"
  68.         '
  69.         'txtServerName
  70.         '
  71.         Me.txtServerName.Location = New System.Drawing.Point(24, 48)
  72.         Me.txtServerName.Name = "txtServerName"
  73.         Me.txtServerName.Size = New System.Drawing.Size(208, 24)
  74.         Me.txtServerName.TabIndex = 0
  75.         Me.txtServerName.Text = configurationAppSettings.Get("ServerName")
  76.         '
  77.         'Button1
  78.         '
  79.         Me.Button1.Location = New System.Drawing.Point(256, 40)
  80.         Me.Button1.Name = "Button1"
  81.         Me.Button1.Size = New System.Drawing.Size(80, 32)
  82.         Me.Button1.TabIndex = 2
  83.         Me.Button1.Text = "Connect"
  84.         '
  85.         'txtUserName
  86.         '
  87.         Me.txtUserName.Location = New System.Drawing.Point(24, 120)
  88.         Me.txtUserName.Name = "txtUserName"
  89.         Me.txtUserName.Size = New System.Drawing.Size(208, 24)
  90.         Me.txtUserName.TabIndex = 0
  91.         Me.txtUserName.Text = configurationAppSettings.Get("UserName")
  92.         '
  93.         'Label3
  94.         '
  95.         Me.Label3.Location = New System.Drawing.Point(24, 168)
  96.         Me.Label3.Name = "Label3"
  97.         Me.Label3.Size = New System.Drawing.Size(216, 24)
  98.         Me.Label3.TabIndex = 1
  99.         Me.Label3.Text = "Password"
  100.         '
  101.         'txtPassword
  102.         '
  103.         Me.txtPassword.Location = New System.Drawing.Point(24, 192)
  104.         Me.txtPassword.Name = "txtPassword"
  105.         Me.txtPassword.Size = New System.Drawing.Size(208, 24)
  106.         Me.txtPassword.TabIndex = 0
  107.         Me.txtPassword.Text = ""
  108.         '
  109.         'DynamicPropertiesForm
  110.         '
  111.         Me.AutoScaleBaseSize = New System.Drawing.Size(7, 17)
  112.         Me.ClientSize = New System.Drawing.Size(352, 245)
  113.         Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.Button1, Me.Label3, Me.txtPassword, Me.Label2, Me.txtUserName, Me.Label1, Me.txtServerName})
  114.         Me.Font = New System.Drawing.Font("Microsoft Sans Serif", 11!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
  115.         Me.Name = "DynamicPropertiesForm"
  116.         Me.Text = "SQL Server Connection"
  117.         Me.ResumeLayout(False)
  118.  
  119.     End Sub
  120.  
  121. #End Region
  122.  
  123.     Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  124.         Me.Close()
  125.     End Sub
  126. End Class
  127.